dcmotor30 2.2.0
Loading...
Searching...
No Matches
main.c File Reference

DC Motor 30 Click example. More...

#include "board.h"
#include "log.h"
#include "dcmotor30.h"

Functions

void application_init (void)
void application_task (void)
int main (void)

Detailed Description

DC Motor 30 Click example.

Description

This example demonstrates the control of a DC motor using the DC Motor 30 Click board. It performs motor driving in different modes (forward, brake, reverse, and coast) and periodically reads the output current and fault status.

The demo application is composed of two sections :

Application Init

Initializes the logger and the Click board driver, then sets the default configuration.

Application Task

Drives the motor in different states and monitors the current consumption and possible fault conditions.

Author
Stefan Filipovic

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )